home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacPeople 1997 August 15
/
MACPEOPLE-1997-08-15.ISO.7z
/
MACPEOPLE-1997-08-15.ISO
/
アップル関連
/
ARA PS アップデート
/
モデム用追加分
/
OMRON ME1414B3⁄VB3 ARA2
/
OMRON ME1414B3_VB3 ARA2
next >
Wrap
Text File
|
1995-11-22
|
12KB
|
604 lines
!**************************************************************************
! OMRON ME1414B3/VB3 ARA Ver2.0 JAPAN
! 1995/11/22 Ver1.0
! Written by OMRON Corp
!
! 'mlts' resource info for this modem:
! byte 1 == 01 -> modem HAS builtin reliability protocols
! byte 2 == 00 -> reserved by Apple
! byte 3 == 23 -> max hex chars in varstr 7 (35 dec)
! byte 4 == 23 -> max hex chars in varstr 8
! byte 5 == 23 -> max hex chars in varstr 9
!
!**************************************************************************
@ORIGINATE
@ANSWER
!------------------------
! reset the serial port
!------------------------
HSReset 0 0 0 0 0 0
@LABEL 1
DTRClear
pause 10
DTRSet
pause 3
! Mac talks to the modem at 14.400 bps.
serreset 19200, 0, 8, 1
setspeed 14400
matchclr
settries 0
! Modem initialize ATZ
@LABEL 2
matchclr
matchstr 1 3 "OK¥13¥10"
matchstr 2 3 "0¥13"
write "ATZ¥13"
matchread 15
inctries
iftries 3 3
jump 2
! Modem Setting
! E0 - Command Echo Off
! Q0 - Command Response On
! V1 - Command Response Format Word
! M1 - Speaker moniter on until carrier detected <--- 1995/3/8
! &C1 - Carrier Signal Detect Carrier from the remote modem
! &D2 - Data Terminal Ready Control On to Off on-hook
! &S1 - Activates DSR before handshaking
! ¥J0 - DTE Speed Setting 19200bps
! ¥V2 - Result Error Corection Type
! ¥N0 - Error Colection MNP-Off
! &M0 - Error Colection V.42-Off
! ¥Q3 - CTS Hardware flow Control
! S0=0 - Don't answer calls
@LABEL 3
matchclr
matchstr 1 4 "OK¥13¥10"
pause 2
write "ATE0Q0V1M1&C1&D2&S1X4¥¥J0¥¥V2¥¥N0&M0¥¥Q3&E2S0=0¥13"
matchread 15
inctries
iftries 3 81
jump 3
!-----------------------------------------
! Modem responding & configured.
! determine if reliable link is requested.
!-----------------------------------------
@LABEL 4
! if modem mnp10 link requested (var 4 == 2) then jump label 5
ifstr 4 5 "2"
!
! if modem v42 link requested (var 4 == 1) then jump label 6
ifstr 4 6 "1"
!
! if no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 8
ifstr 4 8 "0"
!
! else invalid value in var 4; exit w/error
jump 86
!--------------------------------
! MNP10 Link Setting.
!--------------------------------
@LABEL 5
matchclr
matchstr 1 7 "OK¥13¥10"
! &M0 - V.42-Off
! ¥N3 - MNP-On
! ¥X0 - MNP10-On
! %C0 - DATACOMP-Off
pause 2
!write "AT&M0¥¥N3%C0¥13" <--- not MNP10 1995/3/8
write "AT&M0¥¥N3¥¥X0%C0¥13"
matchread 15
inctries
iftries 3 81
jump 5
!-----------------------------------------------------
! V.42bis Link Setting V.42bis --> MNP5 --> Normal
!-----------------------------------------------------
@LABEL 6
matchclr
matchstr 1 7 "OK¥13¥10"
! &M5 - v42 autoreliable mode
pause 2
write "AT¥¥N3&M5%C0¥13"
matchread 15
inctries
iftries 3 81
jump 6
!------------------------------------------------------------------------
! If we DID support compression in the modem, this is where it would go.
!------------------------------------------------------------------------
@LABEL 7
!
!
!
!------------------------------------------------------------------------
! Set ID OMRON MD1414B3/VB3.
!------------------------------------------------------------------------
@LABEL 8
matchclr
matchstr 1 9 "248¥13¥10¥13¥10OK¥13¥10"
pause 2
write "ATI0¥13"
matchread 15
inctries
iftries 3 81
jump 8
!--------------------------------------------------------------------------
! If speaker on flag is true, jump to label 13. Else turn off the speaker.
!--------------------------------------------------------------------------
@LABEL 9
ifstr 2 13 "1"
pause 5
matchclr
matchstr 1 13 "OK¥13¥10"
pause 2
write "ATM0¥13"
matchread 15
jump 81
!*******************************************************************************
! modem ready, so enable answering or originate a call - label range is 11-30
!
!
!*******************************************************************************
@LABEL 13
pause 5
ifANSWER 71
!
! if normal dialing (parm 6 == 0) jump to 19
ifstr 6 19 "0"
!
! if blind dialing (parm 6 == 1) jump to 17
ifstr 6 17 "1"
!
! if manual dialing (parm 6 == 2) jump to 15
ifstr 6 15 "2"
!
! else invalid value in var 6; exit w/error
jump 86
!
!
!
@label 15
note "手動で発信をしています。" 3
! X1 to ignore dialtone & busy for manual dialing, D to dial
write "ATX1D ¥13"
jump 32
!
!
!
@label 17
matchclr
matchstr 1 19 "OK¥13¥10"
! X3 to ignore dialtone for blind dialing
pause 2
write "ATX3¥13"
matchread 30
jump 81
!
!
!
@label 19
! this is where we break up long dialstrings
!
! parm 1 is always the full dialstring from the conn doc
!note "Dialing ^1" 3
note "^1に電話をしています。" 3
! parm 3 is always "p" for pulse & "t" for tone
!
! if parm 8 == blank (complete dialstring in parm 7)
! then jump to label 27 & dial parm 7
ifstr 8 27 " "
!
! if parm 9 == blank (complete dialstring in parms 7 & 8)
! then jump to label 24 & dial parm 7 & 8
ifstr 9 24 " "
!
! else dial parm 7 & 8 & 9 (complete dialstring in parms 7, 8 & 9)
matchclr
matchstr 1 21 "OK¥13¥10"
! parm 7 holds first string fragment
write "ATD^3^7;¥13"
matchread 400
! modem not responding; bailout.
jump 81
!
!
!
@label 21
! parm 8 holds second string fragment
matchclr
matchstr 1 22 "OK¥13¥10"
write "ATD^3^8;¥13"
matchread 400
! modem not responding; bailout.
jump 81
!
!
!
@label 22
! parm 9 holds last string fragment
write "ATD^3^9¥13"
jump 32
!
!
!
!
@label 24
matchclr
matchstr 1 25 "OK¥13¥10"
! parm 7 holds first string fragment
write "ATD^3^7;¥13"
matchread 400
! modem not responding; bailout.
jump 81
!
!
!
@label 25
! parm 8 holds last string fragment
write "ATD^3^8¥13"
jump 32
!
!
!
@label 27
! parm 7 holds entire string
write "ATD^3^7¥13"
jump 32
!***********************************************
! connecting - label range is 34-60
!
!
!***********************************************
@LABEL 32
matchclr
!
matchstr 1 34 "CONNECT 1200¥13¥10"
matchstr 2 35 "CONNECT 1200/REL3¥13¥10"
matchstr 3 35 "CONNECT 1200/REL4¥13¥10"
matchstr 4 36 "CONNECT 1200/REL4-10¥13¥10"
matchstr 5 37 "CONNECT 1200/LAPM¥13¥10"
!
matchstr 6 38 "CONNECT 2400¥13¥10"
matchstr 7 39 "CONNECT 2400/REL3¥13¥10"
matchstr 8 39 "CONNECT 2400/REL4¥13¥10"
matchstr 9 40 "CONNECT 2400/REL4-10¥13¥10"
matchstr 10 41 "CONNECT 2400/LAPM¥13¥10"
!
matchstr 11 42 "CONNECT 4800¥13¥10"
matchstr 12 43 "CONNECT 4800/REL3¥13¥10"
matchstr 13 43 "CONNECT 4800/REL4¥13¥10"
matchstr 14 44 "CONNECT 4800/REL4-10¥13¥10"
matchstr 15 45 "CONNECT 4800/LAPM¥13¥10"
!
matchstr 16 46 "CONNECT 7200¥13¥10"
matchstr 17 47 "CONNECT 7200/REL3¥13¥10"
matchstr 18 47 "CONNECT 7200/REL4¥13¥10"
matchstr 19 48 "CONNECT 7200/REL4-10¥13¥10"
matchstr 20 49 "CONNECT 7200/LAPM¥13¥10"
!
matchstr 21 50 "CONNECT 9600¥13¥10"
matchstr 22 51 "CONNECT 9600/REL3¥13¥10"
matchstr 23 51 "CONNECT 9600/REL4¥13¥10"
matchstr 24 52 "CONNECT 9600/REL4-10¥13¥10"
matchstr 25 53 "CONNECT 9600/LAPM¥13¥10"
!
matchstr 26 54 "CONNECT 12000¥13¥10"
matchstr 27 55 "CONNECT 12000/REL3¥13¥10"
matchstr 28 55 "CONNECT 12000/REL4¥13¥10"
matchstr 29 56 "CONNECT 12000/REL4-10¥13¥10"
matchstr 30 57 "CONNECT 12000/LAPM¥13¥10"
!
matchstr 31 58 "CONNECT 14400¥13¥10"
matchstr 32 59 "CONNECT 14400/REL3¥13¥10"
matchstr 33 59 "CONNECT 14400/REL4¥13¥10"
matchstr 34 60 "CONNECT 14400/REL4-10¥13¥10"
matchstr 35 61 "CONNECT 14400/LAPM¥13¥10"
!
! other result codes.
!
matchstr 36 72 "RING¥13¥10"
matchstr 37 82 "NO DIALTONE¥13¥10"
matchstr 38 83 "NO CARRIER¥13¥10"
matchstr 39 83 "ERROR¥13¥10"
matchstr 40 84 "BUSY¥13¥10"
matchstr 41 85 "NO ANSWER¥13¥10"
matchstr 42 87 "CONNECT¥13¥10"
matchstr 43 82 "HANDSET IN USE¥13¥10"
!
matchread 700
ifANSWER 32
jump 81
!------------------------------------------------------------
! THIS v32b modem has been setup to do cts handshaking,
! and we assume that a cts handshaking cable is being used,
! so we leave the serial port set to 19,200 bps.
!------------------------------------------------------------
@LABEL 34
note "1200bpsで接続確認中" 3
CommunicatingAt 1200
jump 68
!
@LABEL 35
note "1200bps-MNPで接続確認中" 3
CommunicatingAt 1200
jump 68
!
@LABEL 36
note "1200bps-MNP10で接続確認中" 3
CommunicatingAt 1200
jump 68
!
@LABEL 37
note "1200bps-V.42で接続確認中" 3
CommunicatingAt 1200
jump 68
!
!
!
@LABEL 38
note "2400bpsで接続確認中" 3
CommunicatingAt 2400
jump 68
!
@LABEL 39
note "2400bps-MNPで接続確認中" 3
CommunicatingAt 2400
jump 68
!
@LABEL 40
note "2400bps-MNP10で接続確認中" 3
CommunicatingAt 2400
jump 68
!
@LABEL 41
note "2400bps-V.42で接続確認中" 3
CommunicatingAt 2400
jump 68
!
!
!
@LABEL 42
note "4800bpsで接続確認中" 3
CommunicatingAt 4800
jump 68
!
@LABEL 43
note "4800bps-MNPで接続確認中" 3
CommunicatingAt 4800
jump 68
!
@LABEL 44
note "4800bps-MNP10で接続確認中" 3
CommunicatingAt 4800
jump 68
!
@LABEL 45
note "4800bps-V.42で接続確認中" 3
CommunicatingAt 4800
jump 68
!
!
!
@LABEL 46
note "7200bpsで接続確認中" 3
CommunicatingAt 7200
jump 68
!
@LABEL 47
note "7200bps-MNPで接続確認中" 3
CommunicatingAt 7200
jump 68
!
@LABEL 48
note "7200bps-MNP10で接続確認中" 3
CommunicatingAt 7200
jump 68
!
@LABEL 49
note "7200bps-V.42で接続確認中" 3
CommunicatingAt 7200
jump 68
!
!
!
@LABEL 50
note "9600bpsで接続確認中" 3
CommunicatingAt 9600
jump 68
!
@LABEL 51
note "9600bps-MNPで接続確認中" 3
CommunicatingAt 9600
jump 68
!
@LABEL 52
note "9600bps-MNP10で接続確認中" 3
CommunicatingAt 9600
jump 68
!
@LABEL 53
note "9600bps-V.42で接続確認中" 3
CommunicatingAt 9600
jump 68
!
!
!
@LABEL 54
note "12000bpsで接続確認中" 3
CommunicatingAt 12000
jump 68
!
@LABEL 55
note "12000bps-MNPで接続確認中" 3
CommunicatingAt 12000
jump 68
!
@LABEL 56
note "12000bps-MNP10で接続確認中" 3
CommunicatingAt 12000
jump 68
!
@LABEL 57
note "12000bps-V.42で接続確認中" 3
CommunicatingAt 12000
jump 68
!
!
!
@LABEL 58
note "14400bpsで接続確認中" 3
CommunicatingAt 14400
jump 68
!
@LABEL 59
note "14400bps-MNPで接続確認中" 3
CommunicatingAt 14400
jump 68
!
@LABEL 60
note "14400bps-MNP10で接続確認中" 3
CommunicatingAt 14400
jump 68
!
@LABEL 61
note "14400bps-V.42で接続確認中" 3
CommunicatingAt 14400
jump 68
!
!
!
@LABEL 68
! turn on cts handshaking.
HSReset 0 1 0 0 0 0
!
pause 15
ifANSWER 69
pause 30
@LABEL 69
exit 0
!************************************************************
! @ANSWER
! Set the modem to answer on 1st ring - label range is 71-80
!
!************************************************************
@LABEL 71
matchclr
matchstr 1 32 "OK¥13¥10"
pause 2
write "ATS0=2¥13"
matchread 30
inctries
iftries 3 81
jump 71
!
@LABEL 72
ifORIGINATE 32
! claim the serial port
userhook 1
note "電話がかかってきました。" 2
jump 32
!************************************************
! error messages - label range is 81-100
!
!
!************************************************
! Modem Not Responding
@LABEL 81
exit -6019
!
! No Dial Tone
@LABEL 82
note "電話回線が接続されていない。または、0発信をしている場合はダイヤルトーン検出無視にして下さい" 3
exit -6020
!
! No Carrier or Error
@LABEL 83
exit -6021
!
! Busy
@LABEL 84
exit -6022
!
! No Answer
@LABEL 85
exit -6023
!
! varstring invalid value
@LABEL 86
exit -6027
!
! Connect 300bps
@LABEL 87
exit -6002 "ARA doesn't support 300bps connection."
!
!********************************************
! Hang up the modem - label range is 101-120
!
!
!********************************************
@HANGUP
@LABEL 102
settries 0
HSReset 0 0 0 0 0 0
!----------------------------
! firstly try escape sequence
!----------------------------
@LABEL 105
serreset 19200, 0, 8, 1
setspeed 14400
matchclr
matchstr 1 108 "OK¥13¥10"
pause 10
write "+++"
matchread 15
inctries
iftries 3 108
jump 105
!-------------------
! secondly try ATH
!-------------------
@LABEL 108
matchclr
matchstr 1 111 "NO CARRIER¥13¥10"
matchstr 2 111 "OK¥13¥10"
matchstr 3 111 "ERROR¥13¥10"
write "ATH¥13"
matchread 30
inctries
iftries 3 110
jump 108
!---------------------------------------
! finaly try On-to-Off DTR transitions
!---------------------------------------
@LABEL 110
DTRSet
pause 5
DTRClear
pause 5
DTRSet
flush
jump 111
!------------------------------
! recall the factory settings.
!------------------------------
@LABEL 111
serreset 19200, 0, 8, 1
setspeed 14400
pause 15
matchclr
matchstr 1 114 "OK¥13¥10"
write "ATS0=0¥13"
matchread 30
jump 81
!
@LABEL 114
exit 0
!*********************************************************
! labels 121-128 are reserved for future emergency hacks
!
!
!*********************************************************